package com;

import com.mapper.PersonMapper;

import javax.net.ssl.HandshakeCompletedEvent;

public class PersonTest {
    @Test
    public <SqlSession, Person> void findPersonByIdTest() {
        HandshakeCompletedEvent MyBatisUtils = null;
        SqlSession session = (SqlSession) MyBatisUtils.getSession();
        Person person = session.selectOne("com.mapper.PersonMapper.findPersonById", 1);
        System.out.println(person);
        session.close();
    }
    @Test
    public <SqlSession, Person> void selectPersonByIdTest() {
        SqlSession session = MyBatisUtils.getSession();
        PersonMapper mapper = session.getMapper(PersonMapper.class);
        Person person = mapper.selectPersonById(2);
        System.out.println(person.toString());
        session.close();
    }
}
